import http from '@/utils/request'


// 获取vip商品

export const getVipProduct = () => http.get('/product/get_product',{
    params:{
        category_id:'20210827165510715'  // 类目id
    }
})

// 获取下单
export const createPreorder = (product_id,quantity) => http.post('/order/pre_order',{
    product_id,
    quantity
})

// 发起支付
export const startPay = (order_id) => http.post('/pay/payment',{
    order_id
})

// 查询支付的结果
export const queryOrderStatus = (order_id) => http.get('/order/query_order_status',{
    params:{
        order_id
    }
})

// 获取订单详情
export const getOrder = (order_id = "") => http.post('/order/get_order',{
    order_id
})

// 删除订单
export const delOrder = order_id => http.get('/order/del_order',{
    params:{
        order_id
    }
})